package com.liyasong.cf;

import java.io.File;
import java.io.IOException;

import org.apache.mahout.cf.taste.impl.model.file.FileDataModel;
import org.apache.mahout.cf.taste.model.DataModel;

public class MyDataModel {
	
	private static DataModel dataModel;
	private static String movieFile = "ratings.dat";
	private static String bookBigFile = "std_book_ratings.txt";
	private static String bookSmallFile = "bookRatings.txt";
	private static String testFile = "testBig.txt";
	
	private static String movieSimFile = "std_movieSimFile20120504.txt";
	private static String bookSimFile = "bookSimFile.txt";
	private static String testMovieSimFile = "testMovieSimFile.txt";
	
	public static DataModel MovieData() throws IOException {
		dataModel = new FileDataModel(new File(movieFile));
		return dataModel;
	}
	
	public static DataModel bookBigData() throws IOException {
		dataModel = new FileDataModel(new File(bookBigFile));
		return dataModel;
	}
	
	public static DataModel bookSmallData() throws IOException {
		dataModel = new FileDataModel(new File(bookSmallFile));
		return dataModel;
	}
	
	public static DataModel testData() throws IOException {
		dataModel = new FileDataModel(new File(testFile));
		return dataModel;
	}
	
	public static File movieSimData() throws IOException {
		return new File(movieSimFile);
	}
	
	public static File bookSimData() throws IOException {
		return new File(bookSimFile);
	}
	
	public static File testMovieSimData() throws IOException {
		return new File(testMovieSimFile);
	}
}
